﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class PK
    {
        private string wchu;//玩家出拳
        private string dchu;//对手出拳
        int c;
        int z;
        int ying=0;
        int shu=0;

        public string Dchu { get => dchu; set => dchu = value; }
        public string Wchu { get => wchu; set => wchu = value; }
        public int Ying { get => ying; set => ying = value; }
        public int Shu { get => shu; set => shu = value; }

        public void Wjuedou()
        {
            Console.WriteLine("请出拳：1.剪刀；2.石头；3.布《请输入相应数字》");
            c = int.Parse(Console.ReadLine());
            switch (c)
            {
                case 1:
                    wchu = "剪刀";
                    break;
                case 2:
                    wchu = "石头";
                    break;
                case 3:
                    wchu = "布";
                    break;
            }
        }
        public void Djuedou()
        {
            Random ran = new Random();
            z=ran.Next(1,4);
            switch (z)
            {
                case 1:
                    dchu= "剪刀";
                    break;
                case 2:
                    dchu = "石头";
                    break;
                case 3:
                    dchu = "布";
                    break;
            }
        }
        public void panding()
        {
            if ( c== 1 && z == 1 || c == 2 && z == 2 || c == 3 && z == 3)
            { Console.WriteLine("和局，真衰！嘿嘿，等着瞧吧！"); }
            else if (c == 1 && z == 3 || c == 2 && z == 1 || c == 3 && z == 2)
            {
                Console.WriteLine("恭喜你呐，赢啦");
                Ying++;
            }
            else if (c == 1 && z == 2 || c == 2 && z == 3 || c == 3 && z == 1)
            {
                Console.WriteLine("笨蛋，输啦");
                Shu++;
            }
            else
            {
                Console.WriteLine("输错了，重新输入");
            }
        }
    }
}
